home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2006 May
/
PCWMAY06.iso
/
Software
/
Freeware
/
First Page 2006 3.00
/
fp2006-final-3.00-setup.exe
/
{app}
/
Iscripts
/
Message Dialogs
/
confirm-alert.izs
< prev
next >
Wrap
Text File
|
2005-09-28
|
2KB
|
107 lines
<!NOWIZARD>
<!TITLE>Confirm (Alert)
<!/TITLE>
<!DESCRIPTION> Here is a JavaScript confirm message that has variable responses. Basically, the response they get depends on what the user enters.
<!/DESCRIPTION>
<!CATEGORY>Messages<!/CATEGORY>
<!SCRIPT>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL CONFIRM (ALERT):
1. Paste the coding into the HEAD of your HTML document
2. Put last coding into the BODY section of document -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function askData() {
var inputedData = prompt ("type something!", "" );
if (confirm("Are you sure you typed "+inputedData+"?")) {
alert ("Ok, you did type "+inputedData+"!");
}
else {
alert ("No, you did not type "+inputedData+", did you? OK. Guess ya did.");
}
}
// End -->
</SCRIPT>
<!-- STEP TWO: Put this code into the BODY of your HTML document -->
<BODY>
<CENTER>
<FORM>
<input type=button value="Confirm (Alert)" onClick="askData()">
</FORM>
<!-- Or another method... --><BR>Or....<BR>
<A HREF="" onMouseover="askData()">Confirm & Alert</A>
</CENTER>
<!-- END OF SCRIPT -->
<!/SCRIPT>
<!PREVIEW>
<!-- START OF SCRIPT -->
<!-- HOW TO INSTALL CONFIRM (ALERT):
1. Paste the coding into the HEAD of your HTML document
2. Put last coding into the BODY section of document -->
<!-- STEP ONE: Copy this code into the HEAD of your HTML document -->
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
function askData() {
var inputedData = prompt ("type something!", "" );
if (confirm("Are you sure you typed "+inputedData+"?")) {
alert ("Ok, you did type "+inputedData+"!");
}
else {
alert ("No, you did not type "+inputedData+", did you? OK. Guess ya did.");
}
}
// End -->
</SCRIPT>
<!-- STEP TWO: Put this code into the BODY of your HTML document -->
<BODY>
<CENTER>
<FORM>
<input type=button value="Confirm (Alert)" onClick="askData()">
</FORM>
<!-- Or another method... --><BR>Or....<BR>
<A HREF="" onMouseover="askData()">Confirm & Alert</A>
</CENTER>
<!-- END OF SCRIPT -->
<!/PREVIEW>
<!RELATED>NONE<!/RELATED>